package com.huaao.micropolice.root.api;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import com.huaao.micropolice.common.util.JsonUtil;
import com.huaao.micropolice.core.model.alert.AuditRecord;
import com.huaao.micropolice.core.service.alert.AuditRecordService;
import com.huaao.micropolice.root.controllers.BaseController;

@Controller
@RequestMapping("AuditRecord")
public class AuditRecordController  extends BaseController {
	@Autowired
	AuditRecordService service;
	
	/**
	 * 根据警情Id获取警情审批信息
	 * 
	 * @return
	 */
	@RequestMapping(value = "/findAlertInfo.do", method = RequestMethod.POST)
	public ResponseEntity<String>  findAuditRecordInfoList(@RequestParam("alertid") String alertid){
		List<AuditRecord> listAudit=service.findAuditRecordListToalertId(alertid);
		 return  super.ajaxModel(JSON,JsonUtil.toJson(listAudit));
	}
}
